home *** CD-ROM | disk | FTP | other *** search
- #!/bin/csh -f
-
- #
- # update path to also look in the same directory from where this script
- # was executed from
- #
-
- set path = (/usr/bsd /bin /usr/bin /usr/sbin /usr/bin/X11)
- set DT_xconfirm = "$DT_utilities/DT_xconfirm"
-
- set path = (${DT_util_path} $path)
-
- #
- # find out and remember the user name
- #
-
- if ($?HOME) then
- set userName = $HOME
- else
- $DT_xconfirm nohome
- exit 0
- endif
-
- # save a version of .dtcdresource in the home directory
-
- tail +2 $userName/$DT_WWW_ROOT/.dtcdresource | sed -e 's/[ ][ ]*.*/ -1/' > $userName/.dtcdresource
-
- #
- # clean up time
- #
-
- if ( ! -e $userName/$DT_WWW_ROOT ) then
- $DT_xconfirm warn "Server has not been installed."
- else
-
- #
- # remove file in /tmp
- # have to rely on /tmp ???
- #
-
- /usr/bin/rm -r /tmp/.userhome_`cat $userName/$DT_WWW_ROOT/logs/httpd.port`
- /usr/bin/rm -r /tmp/.cdlocation_`cat $userName/$DT_WWW_ROOT/logs/httpd.port`
-
- #
- # remove the $DT_WWW_ROOT environment
- #
-
- #y#/sbin/mv $userName/$DT_WWW_ROOT/.netscape-preferences $userName/.save_pref
- #y#/usr/bin/rm -rf $userName/$DT_WWW_ROOT
- #y#/sbin/mkdir $userName/$DT_WWW_ROOT
- #y#/sbin/mv $userName/.save_pref $userName/$DT_WWW_ROOT/.netscape-preferences
-
- if ("$DT_WWW_ROOT" != "") /usr/bin/rm -rf $userName/$DT_WWW_ROOT
-
- # make sure the slate is clean
- if ( -e $userName/$DT_WWW_ROOT ) then
- $DT_xconfirm warn "Could not uninstall.\
- Check permissions on $userName/$DT_WWW_ROOT"
- endif
- echo "$DT_SNAME WWW environment: removed"
- endif
-
- #
- # clean up stuff in tmpdir
- #
-
- exit 1
-